package com.superman.supermarket.client.activity;

import java.util.HashMap;
import java.util.Map;

import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
import com.superman.mvpframe.client.mvp.IPageView;
import com.superman.mvpframe.client.mvp.IPageViewPresenter;
import com.superman.supermarket.client.constant.OrderListTabConstants;
import com.superman.supermarket.client.mvp.ShopAbstractActivity;
import com.superman.supermarket.client.view.person.PersonView;
import com.superman.supermarket.client.view.person.PersonView.PersonViewPresenter;

/**
 * 我的页面
 * 
 * @author superman
 * @version 2018年8月2日下午5:08:48
 */
public class PersonActivity extends ShopAbstractActivity implements PersonViewPresenter {

	@Inject
	PersonView personView;

	@Override
	public IPageView getView() {
		return personView;
	}

	@Override
	public IPageViewPresenter getViewPresenter() {
		return this;
	}

	@Override
	public void onActivity(EventBus eventBus) {
	}

	@Override
	public void popToRefresh() {
		// TODO Auto-generated method stub
	}

	@Override
	public void popToRefresh(Object contextData) {
		// TODO Auto-generated method stub

	}

	@Override
	public void pushToAddrListPage() {
		placeController.push(placeFactory.getAddressListPlace());
	}

	@Override
	public void pushToCollectionPage() {
		placeController.push(placeFactory.getMyFavoritePlace());
	}

	@Override
	public void pushToCouponListPage() {
		placeController.push(placeFactory.getMyCouponListPlace());
	}

	@Override
	public void pushToOrderListPage(OrderListTabConstants constants) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("state", constants.getState());
		map.put("tabindex", constants.getTabIndex());
		placeController.push(placeFactory.getOrderListPlace(), map);
	}

	@Override
	public void pushToRefresh() {
	}

	@Override
	public void pushToRefundListPage() {
		placeController.push(placeFactory.getRefundListPlace());
	}

}
